package com.mxpio.erp.common.vo;

import java.io.Serializable;
import java.math.BigDecimal;

import com.mxpio.erp.common.inventory.entity.Lot;
import com.mxpio.erp.common.inventory.entity.SupplyChain;
import com.mxpio.erp.common.inventory.entity.Warehouse;
import com.mxpio.erp.common.jpa.model.Notice;
import com.mxpio.erp.common.technology.entity.Item;
import com.mxpioframework.security.annotation.Dict;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Transient;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class OrderExcuteLineVo implements Serializable {

	private static final long serialVersionUID = 1L;

	@Schema(description = "业务单行号")
	private String bizOrderlineNo;

	@Schema(description = "业务单号")
	private String bizOrderNo;
	
	@Schema(description = "通知单行号")
	private String noticeLineNo;

	@Schema(description = "通知单号")
	private String noticeNo;
	
	@Schema(description = "仓单行号")
	private String bizWoLineNo;

	@Schema(description = "仓单单号")
	private String bizWoNo;
	
	@Schema(description = "仓库")
	private String whCode;
	
	@Schema(description = "物料代码")
	private String itemCode;
	
	@Schema(description = "数量")
	private BigDecimal quantity;
	
	@Schema(description = "执行行总数量")
	private BigDecimal lineQuantity;
	
	@Schema(description = "批次号")
	private String lotNo;

	@Schema(description = "子批次索引号")
	private String subLotIndex;

	@Schema(description = "是否检验")
	@Dict(dicCode = "ERP_COMMON_YESNO")
	private String inQualityControl;
	
	@Schema(description = "顺序号")
	private String sort;

	//不良品退料 相关字段bomWhCode->supplementFlag
	@Schema(description = "订单Bom对应仓库code")
	@Dict(dicCode = "whCode", dicEntity = Warehouse.class, dicText = "whName")
	private String bomWhCode;//选择批次库存

	@Schema(description = "发现人")
	private String reporter;

	@Schema(description = "发现工序")
	private String reportProc;

	@Schema(description = "异常分类")
	private String exceptionType;

	@Schema(description = "不良原因")
	private String defectiveReason;

	@Schema(description = "原因描述")
	private String defectiveDesc;

	@Schema(description = "责任单位")
	private String responseUnit;

	@Schema(description = "是否补料")
	private String supplementFlag;


	@Schema(description = "补料原因")
	private String supplementReason;

	@Schema(description = "是否完工")
	private String completionFlag;

	@Schema(description = "备注")
	private String memo;

	@Transient
	private Notice notice;

	@Transient
	private Item item;

	@Transient
	private SupplyChain supplyChain;

	@Transient
	private Lot	splitLot;//新拆批后批次

}
